import request from '@/utils/request'
import url from 'postcss-url'

export default {
  //获取学生List
  getStudentList(current, limit, userQuery) {
    return request({
      url: `/intern/stu/list/${current}/${limit}`,
      method: 'post',
      //userQuery条件对象，后端使用RequestBody获取数据
      //data表示把对象转换json进行传递到接口里面
      data: userQuery
    })
  },

  //获取简单的学生List
  getSampleStudentList(iid) {
    return request({
      url: `/intern/stu/list/${iid}`,
      method: "get"
    })
  },

  //获取没有教师的学生列表
  getStuNoTeaList(current, limit) {
    return request({
      url: `/intern/stu/noTeachList/${current}/${limit}`,
      method: 'post',
    })
  },

  //获取没有实习单位的学生列表
  getStuNoInternList(current, limit) {
    return request({
      url: `/intern/stu/noInternList/${current}/${limit}`,
      method: 'post'
    })
  },

  //逻辑删除学生
  removeStu(sid) {
    return request({
      url: `/intern/stu/delete/${sid}`,
      method: "delete"
    })
  },

  //添加学生
  addStudent(user) {
    return request({
      url: `/intern/stu/add`,
      method: "post",
      data: user
    })
  },

  //上传学生Excel 
  addStudentExcel(data) {
    return request({
      url: '/EasypoiSingleExcelViewTest/importExcelTest',
      method: "post",
      data: data
    })
  }

}
